<?php /* Smarty version Smarty-3.1.13, created on 2014-04-10 23:46:21
         compiled from "E:\phpweb\YiVa\templates\blog.tpl" */ ?>
<?php /*%%SmartyHeaderCode:29065533ae932bed6a6-22663106%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'ddab19f168fbdcda400c90bd97a3fd06010cbfb3' => 
    array (
      0 => 'E:\\phpweb\\YiVa\\templates\\blog.tpl',
      1 => 1396971767,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '29065533ae932bed6a6-22663106',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.13',
  'unifunc' => 'content_533ae932c371d4_33126700',
  'variables' => 
  array (
    'paramdata' => 0,
    'web_root' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_533ae932c371d4_33126700')) {function content_533ae932c371d4_33126700($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("layouts/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<script type="text/javascript">
	$(document).ready(function(){

		key = "<?php echo $_smarty_tpl->tpl_vars['paramdata']->value->key;?>
";
		type = "<?php echo $_smarty_tpl->tpl_vars['paramdata']->value->type;?>
";
		if(key != null && key != ""){
			$("#searchBlogsWords").val(key);
		}
		getBlogList();
		$("#searchBlogs").click(function() {
			 document.getElementById('bloglist').innerHTML = "";
			 key =$("#searchBlogsWords").val();
			 page = 1;
			 getBlogList();
	    });
	});

	var page = 1;
	var key = null;
	var type = null;
	function getBlogList(){
	     $.ajax({
	        type: "POST",
	        url: '<?php echo $_smarty_tpl->tpl_vars['web_root']->value;?>
blog/getBlogList',
	       	data:{page:page,key:key,type:type},
	        success:function(data){
	            var data = $.parseJSON(data);
	            for(var index in data.rows){
	            	//$('#bloglist').innerHTML+=createItemLI( data.rows[index]);
	            	document.getElementById('bloglist').innerHTML+=createItemLI( data.rows[index]);
	            }
		    },
	        error: function () {
	        }
	    });
	}

	function getprepage(){
		page++;
		getBlogList();
	}

	function createItemLI(item){
	
		var str = "<li><a href='"+item.post_url+"'><img src='"+item.post_file_location+"'/></a>"
  			
	       +" <a href='"+item.post_url+"' class='blogname-h'>"+item.post_title+"</a>"
	       +"<a href='"+item.category_url+"' class='blogtag'>"+item.category_name+"</a>"
	       +" <time class='time'>"+item.post_date+"</time>"
	       +" <p class='mt30'>"+item.post_content+"<a href='"+item.post_url+"'>Read more</a>  </p></li>";
		   return str;
	}
</script>
<div class="title_template" id="blogtitle">
	<div class="titlecenter">
    	<h3>Our&nbsp;<font>Blog</font></h3>
        <p>he latest digital marketing news</p>
    </div>
    <input type="text" id="key" style="display: none;" value="<?php echo $_smarty_tpl->tpl_vars['paramdata']->value->key;?>
"></input> 
    <input type="text" id="type" style="display: none;" value="<?php echo $_smarty_tpl->tpl_vars['paramdata']->value->type;?>
"></input> 
</div>  
<div class="titlecenter pt30"> 
    <div class="titlecenter pt-t30">
        <div class="content f_l">
        	<div class="subbloglist">
                <ul id="bloglist">
<!--                     <li> -->
<!--                         <a href="#"><img src="<?php echo @constant('WEBSITE_URL');?>
public/photo/photo01.jpg"/></a> -->
<!--                         <a href="#" class="blogtag">Blog</a> -->
<!--                         <a href="#" class="blogname-h">Google+ Hashtag Search Results Have Reached the UK</a> -->
<!--                         <time class="time">10th February, 2014</time> -->
<!--                         <p class="mt30"> -->
<!--                         	Setting up e-commerce tracking for Google Analytics is relatively easy, although one little mistake can be enough to skew the data and provide erroneous reporting. In this blog post, the latest in our e-commerce series, we talk you through the …  -->
<!-- <a href="#">Read more</a> -->
<!--                         </p> -->
<!--                     </li> -->
                     
                </ul>
                <a   onclick="getprepage()" class="blogmorr f_r">View more »</a>
            </div>
        </div>
      <?php echo $_smarty_tpl->getSubTemplate ("layouts/blogside.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

    </div>
</div> 

<?php echo $_smarty_tpl->getSubTemplate ("layouts/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
<?php }} ?>